package net.wofly.sale.order.service.impl;

import net.wofly.sale.order.domain.OrderPublishActivityMapping;
import net.wofly.sale.order.repository.OrderPublishActivityMappingRepository;
import net.wofly.sale.order.service.IOrderPublishActivityMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service("iOrderPublishActivityMappingService")
@Transactional
public class OrderPublishActivityMappingServiceImpl implements IOrderPublishActivityMappingService {
    
    @Autowired
    OrderPublishActivityMappingRepository orderPublishActivityMappingRepository;
    
    @Override
    public OrderPublishActivityMapping save(OrderPublishActivityMapping entity) {
        return orderPublishActivityMappingRepository.save(entity);
    }
    
    @Override
    public void delete(OrderPublishActivityMapping entity) {
        orderPublishActivityMappingRepository.delete(entity);
    }
    
    @Override
    public void delete(String key) {
        orderPublishActivityMappingRepository.delete(key);
    }
    
    @Override
    public OrderPublishActivityMapping findOne(String key) {
        return orderPublishActivityMappingRepository.findOne(key);
    }
    
    @Override
    public List<OrderPublishActivityMapping> save(List<OrderPublishActivityMapping> entityList) {
        return (List<OrderPublishActivityMapping>) orderPublishActivityMappingRepository.save(entityList);
    }
    
    @Override
    public List<OrderPublishActivityMapping> findByOrderID(String orderID) {
        return orderPublishActivityMappingRepository.findByOrderID(orderID);
    }
}
